/**
 * FileName: UserController
 * Author:   Administrator
 * Date:     2018/11/16 16:42
 * Description: 后台用户管理
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.fortune.rainshinesystem.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.system.YuYueModel;
import com.fortune.rainshinesystem.service.YuYueService;

/**
 * 〈一句话功能简述〉<br> 
 * 〈后台用户管理〉
 *
 * @author Administrator
 * @create 2018/11/16
 * @since 1.0.0
 */
@RestController
@RequestMapping(value = "/yuyue")
public class YuYueController {
    @Autowired
    private YuYueService service;

    /**
     * @Title: list
     * @Description: 获取列表
     * @author zhangxin
     * @phone 17561783855
     * @date 2019年3月28日
     */
    @PostMapping("/list")
    public MsgModel list(@RequestBody ParmsModel parm){
        return service.list(parm);
    }
    
    /**
     * @Title: updateState
     * @Description: 更新状态
     * @author zhangxin
     * @phone 17561783855
     * @date 2019年3月28日
     */
    @PostMapping("/updateState")
    public boolean updateState(@RequestBody YuYueModel yuyue){
    	return service.updateState(yuyue);
    };
    
    /**
     * @Title: delete
     * @Description: 删除
     * @author zhangxin
     * @phone 17561783855
     * @date 2019年3月28日
     */
    @PostMapping("/delete")
    public boolean delete(@RequestBody YuYueModel yuyue) {
		return service.delete(yuyue);
    	
    };
    
    /*添加用户*/
    @PostMapping("/add")
    public MsgModel add(@RequestBody YuYueModel info){
        return service.addYuYue(info);
    }

}